from django.contrib import admin

# # Register your models here.
# from django.contrib import admin
# from .models import Blogger,Link,Layout
# from django.utils.safestring import mark_safe
# # Register your models here.
#
# admin.site.site_title="Mr Wolf Blog"
# admin.site.site_header="Mr Wolf博客管理系统"
#
# @admin.register(Layout)
# class LayoutAdmin(admin.ModelAdmin):
#     list_display = ['id','main_img', 'logo_img', 'website_name']
#     list_editable = ['website_name']
#
#     # 缩略图，后台展示页显示缩略图
#     def main_img(self,obj):
#         return mark_safe(u'<img src="%s" width="100px" />' % obj.main_image.url)
#     main_img.short_description = u'首页图'
#
#     def logo_img(self,obj):
#         return mark_safe(u'<img src="%s" width="100px" />' % obj.logo_image.url)
#     logo_img.short_description = u'logo'
## admin.py

from django.contrib import admin

# Register your models here.

from bookshop.models import Book, Types, UserInfo, UserType, UserBlack,UserBook

admin.site.register(Book)  # 注册一个模型
admin.site.register(Types)
admin.site.register(UserInfo)
admin.site.register(UserType)
admin.site.register([UserBlack, UserBook])
# admin.site.register([Book, UserInfo, Types, UserInfo, UserBlack])  # 注册多个模型，  使用列表

